package com.javasm.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author WangJie
 * @version 1.0
 * @Description:
 * @date: 2020/7/15 15:12
 * @since JDK 1.8
 */

public class AdminUser implements Serializable {
    private Integer aid;
    private String aname;
    private String apwd;
    private String aimg;
    private Integer role_id;
    private Date reg_time;
    private Date login_time;
    private Integer isvalid;
    private String menu_id;
    private String remark;

    @Override
    public String toString() {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String valid = isvalid == 1 ? "有效" : "无效";
        String role = role_id == 1 ? "管理员" : (role_id == 2 ? "普通用户" : "渠道");
        return "AdminUser{" +
                "aid=" + aid +
                ", aname='" + aname + '\'' +
                ", apwd='" + apwd + '\'' +
                ", aimg='" + aimg + '\'' +
                ", role_id=" + role +
                ", reg_time=" + format.format(reg_time) +
                ", login_time=" + format.format(login_time) +
                ", isvalid=" + valid +
                ", menu_id='" + menu_id + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }

    public Integer getAid() {
        return aid;
    }

    public void setAid(Integer aid) {
        this.aid = aid;
    }

    public String getAname() {
        return aname;
    }

    public void setAname(String aname) {
        this.aname = aname;
    }

    public String getApwd() {
        return apwd;
    }

    public void setApwd(String apwd) {
        this.apwd = apwd;
    }

    public String getAimg() {
        return aimg;
    }

    public void setAimg(String aimg) {
        this.aimg = aimg;
    }

    public Integer getRole_id() {
        return role_id;
    }

    public void setRole_id(Integer role_id) {
        this.role_id = role_id;
    }

    public Date getReg_time() {
        return reg_time;
    }

    public void setReg_time(Date reg_time) {
        this.reg_time = reg_time;
    }

    public Date getLogin_time() {
        return login_time;
    }

    public void setLogin_time(Date login_time) {
        this.login_time = login_time;
    }

    public Integer getIsvalid() {
        return isvalid;
    }

    public void setIsvalid(Integer isvalid) {
        this.isvalid = isvalid;
    }

    public String getMenu_id() {
        return menu_id;
    }

    public void setMenu_id(String menu_id) {
        this.menu_id = menu_id;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
